package com.kaifamiao.annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.logging.Logger;

// <bean id="tigerService" class="com.kaifamiao.annotation.TigerService" />
// @Service("tigerService")
@Service
public class TigerService {

    private static Logger logger = Logger.getGlobal();

    @Autowired
    private TigerDao tigerDao;

    public boolean save( Tiger t ) {
        logger.info( "保存" + t.getName() );
        return tigerDao.persist(t);
    }

    public TigerDao getTigerDao() {
        return tigerDao;
    }

    public void setTigerDao(TigerDao tigerDao) {
        this.tigerDao = tigerDao;
    }

}
